import {MockMethod} from 'vite-plugin-mock'
import {baseApi} from '../../config'

export default [
    {
        url: `${baseApi}/system/loginLog/list`,
        //params: {pageNum:1,pageSize:10,status:null,ipaddr:null,loginLocation:null,userName:null},
        method: 'get',
        response: () => {
            return {
                "code": 0,
                "message": "",
                "data": {
                    "currentPage": 1,
                    "total": 5,
                    "list": [
                        {
                            "infoId": 5,
                            "loginName": "demo",
                            "ipaddr": "::1",
                            "loginLocation": "内网IP",
                            "browser": "Edge",
                            "os": "Windows 10",
                            "status": 1,
                            "msg": "登录成功",
                            "loginTime": "2024-11-08 09:14:50",
                            "module": "系统后台"
                        },
                        {
                            "infoId": 4,
                            "loginName": "demo",
                            "ipaddr": "::1",
                            "loginLocation": "内网IP",
                            "browser": "Edge",
                            "os": "Windows 10",
                            "status": 1,
                            "msg": "登录成功",
                            "loginTime": "2024-11-07 17:09:13",
                            "module": "系统后台"
                        },
                        {
                            "infoId": 3,
                            "loginName": "demo",
                            "ipaddr": "::1",
                            "loginLocation": "内网IP",
                            "browser": "Edge",
                            "os": "Windows 10",
                            "status": 1,
                            "msg": "登录成功",
                            "loginTime": "2024-11-07 16:38:22",
                            "module": "系统后台"
                        },
                        {
                            "infoId": 2,
                            "loginName": "demo",
                            "ipaddr": "::1",
                            "loginLocation": "内网IP",
                            "browser": "Edge",
                            "os": "Windows 10",
                            "status": 1,
                            "msg": "登录成功",
                            "loginTime": "2024-09-10 17:40:41",
                            "module": "系统后台"
                        },
                        {
                            "infoId": 1,
                            "loginName": "demo",
                            "ipaddr": "::1",
                            "loginLocation": "内网IP",
                            "browser": "Edge",
                            "os": "Windows 10",
                            "status": 1,
                            "msg": "登录成功",
                            "loginTime": "2024-09-10 16:53:16",
                            "module": "系统后台"
                        }
                    ]
                }
            }
        }
    },
    {
        url: `${baseApi}/system/loginLog/delete?`,
        params: {"ids": [1]},
        method: 'DELETE',
        response: () => {
            return {
                "code": 0,
                "message": "",
                "data": null
            }
        }
    },
    {
        url: `${baseApi}/system/loginLog/clear`,
        method: 'delete',
        response: () => {
            return {
                "code": 0,
                "message": "",
                "data": null
            }
        }
    },
] as MockMethod[]
